package com.atgm.mall.gmmailmember.vo.req;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

@Data
public class MemberRegistVo {

    @NotEmpty(message = "用户名不得为空")
    private String username;

    @NotEmpty(message = "密码不得为空")
    private String password;

    @NotBlank(message = "手机号不得为空")
    @Length(min = 11, max = 11, message = "手机号只能为11位")
    @Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "手机号格式有误")
    private String mobile;

}
